<include file="public@header" />
</head>

<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('AdminCardPub/index')}">发行礼券信息</a></li>
			<li class="active"><a>导入发行信息</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20">
			<div class="table-actions">
				<input id="file_name" value="" readonly="readonly">
				<input type="hidden" id="file_path" name="file_path" value="">
				<a id="uploadbtn" class="btn btn-primary btn-sm js-ajax-submit" href="javascript:upload_one_local('文件上传','#file_name','#file_path','#savebtn','#uploadbtn','file');">excel导入</a>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button id="savebtn" class="btn btn-primary js-ajax-submit" type="submit" style="display:none" data-action="{:url('AdminCardPub/addpost')}"
					 data-msg="你确定要上传！">上传</button>
					<a class="btn btn-default" href="{:url('AdminCardPub/index')}">{:lang('BACK')}</a>
				</div>
			</div>

		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
	<script type="text/javascript">
		function upload_one_local(dialog_title, file_name, filepath, savebtn, uploadbtn, filetype, extra_params, app) {
			openUploadDialog(dialog_title, function (dialog, files) {
				$(file_name).val(files[0].name);
				$(filepath).val(files[0].filepath);
				$(savebtn).css('display', 'inline-block');
				$(uploadbtn).css('display', 'none');
			}, extra_params, 0, filetype, app);
		}
	</script>
</body>

</html>